<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../../笔记/jquery/jquery-3.4.1.js"></script>
</head>
<style>
    p{
        text-indent: 2em;
    }
</style>
<body>
    <div>
        <input type="text">
        <button>提交</button>
    </div>
    <div id='box1'></div>
    <script>
        let xhr=new XMLHttpRequest();
        $('button').click(function(){
            valuee=$('input').val();
        xhr.open('get','http://zhouxunwang.cn/data/?id=60&key=UeGVq9JkSYn+h5KN+4oyQG7HOgTgsJeZ/px07Q&q='+valuee,true);
        xhr.send()
        xhr.onload= function(){
            let jsonData=JSON.parse(xhr.responseText);
            var means=jsonData.result;
            var res=`<p><h2>${means[0].title}</h2></p><p>${means[0].des}</p>`
            for(let i=1;i<means.length;i++){
                $('#box1').html(res+=`<p><h2>${means[i].title}</h2></p><p>${means[i].des}</p>`)
            }
        }
        })
        
    </script>
</body>
</html>